<!-- 页头 公共页(生成新引用页) -->
<div class="headerModule">
    <div class="box">
        <a href="" class="logo">
            <img alt="LOGO" th:src="@{'/static/images/logo.png'}"/>
        </a>
        <!-- 引入站点栏目 -->
        <div class="nav">
            <ul class="clearfix">
                <li><a th:href="@{'/index'}" class="one-pan-link-mark">首页</a></li>
                <li><a href="askList" class="one-pan-link-mark">问答</a></li>
            </ul>
        </div>

        <div class="head-search">
            <form action="search" method="get">
                <input style="position: relative;top: -10px;" name="keyword" th:value="${keyword}"
                       autocomplete="off" placeholder="搜索"/>
                <input type="submit" class="sub-button"/>
            </form>
        </div>
        <div class="menu">
            <ul class="clearfix" th:if="${session.userList==null}">
                <!-- 未登录 -->
                <li><a th:href="@{/login?target=register}">注册</a></li>
                <li><a th:href="@{/login}">登录</a></li>
            </ul>
            <ul class="clearfix" th:if="${session.userList!=null}">
                <!-- 已登录 -->
                <li>
                    <div class="author">
                        <a th:href="@{'/user/control/home'}" th:if="${session.userList.avatarname!=null}">
                          <img th:src="@{'/picShow/'+${session.userList.avatarname}}"/></a>
                        <a th:href="@{'/user/control/home'}" th:if="${session.userList.avatarname==null}">
                            <img th:src="@{'/static/images/min_avata.png'}"/>
                        </a>
                    </div>
                    <a th:href="@{'/user/control/home'}" th:text="${session.userList.nikename}">测试用户</a>
                </li>
                <li><a th:href="@{'/user/control/home'}">用户中心<span id="allMessage-badge" class="badge"
                                                          style="position: absolute; margin-top: 14px; display: none;"></span></a>
                </li>
                <li><a href="" onClick="javascript:document.getElementById('logout').submit();return false;">退出</a></li>
                <form id="logout" th:action="@{/logout}" method="post"></form>

            </ul>
        </div>
    </div>
</div>


